#include<iostream>
#include<math.h>
using namespace std;
int main(){
	int a1,a2,a3,a4;
	int m,n;
	int sum=0;
	cout<<"Please input one integer number m:";
	cin>>m;
	n=abs(m);
	a4=n/1000;
	a3=(n%1000)/100;
	a2=(n%100)/10;
	a1=n%10;
	sum=a1+a2+a3+a4;
	cout<<"sum="<<sum<<endl;
	return 0;
	}